from flask import Flask

app = Flask(__name__)

# 如果方法发生了重名，在Python中就出现了错误，无法启动，需要通过endpoint指定端点
@app.route("/hi",methods=["GET","POST"],endpoint="hi")
def hello():
    return "Hi 聂茹风"

# 定义方法
@app.route("/hello",methods=["GET","POST"],endpoint="hello")
def hello():
    return "Hello World"



if __name__ == '__main__':
    app.run()